package com.kaili.basic.controller;

import com.kaili.basic.pojo.dto.MdmGlobalClobQueryDto;
import com.kaili.basic.pojo.vo.MdmGlobalClobQueryVO;
import com.kaili.basic.pojo.vo.MdmGlobalClobVO;
import com.kaili.basic.service.IGlobalClobService;
import com.kaili.basic.version.ApiVersion;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
* 复选数据 控制器
* @author:zhangjl
* @Time: 2019-07-24
* @Copyright: ©  杭州凯立通信有限公司 版权所有
* @Warning: 本内容仅限于公司内部传阅,禁止外泄或用于其它商业目的
*/
@ApiVersion(1)
@RequestMapping("/{api_version}")
@RestController
@Api(tags = "复选数据管理", description = "复选数据管理相关设置API")
public class MdmGlobalClobController {
    @Autowired
    IGlobalClobService globalClobService;

	@GetMapping(value = "/globalclobs/strategyId")
	@ApiOperation("根据策略id查询对应复选数据")
	public List<MdmGlobalClobQueryVO> queryStrategyId(@ModelAttribute MdmGlobalClobQueryDto dto) {
		return globalClobService.queryStrategyId(dto);
	}

	@GetMapping(value = "/globalclobs/queryById")
	@ApiOperation("根据ID查询复选数据")
	public List<MdmGlobalClobVO> queryById(@ModelAttribute MdmGlobalClobQueryDto dto) {
		return globalClobService.queryById(dto);
	}

	@GetMapping(value = "/globalclobs")
	@ApiOperation("基础数据复选框查询")
	public List<MdmGlobalClobVO> queryList(@ModelAttribute MdmGlobalClobQueryDto dto) {
		return globalClobService.queryList(dto);
	}

}
